{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "100ML_Day4_Outlier Detection.ipynb",
      "provenance": [],
      "authorship_tag": "ABX9TyMlz4e5ofukdRXwhabJmOYS",
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/Divyanshu-ISM/Machine-Learning-Deep-Learning/blob/main/100ML_Day4_Outlier_Detection.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Walbr38I2mAF"
      },
      "source": [
        "# 100 ML - Day 4\r\n",
        "\r\n",
        "> OUTLIER DETECTION"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "B2RNc7Ji2fBi"
      },
      "source": [
        "import numpy as np\r\n",
        "import matplotlib.pyplot as plt\r\n",
        "import seaborn as sns"
      ],
      "execution_count": 3,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "FZy6tsr62zRP"
      },
      "source": [
        "X = list(np.random.normal(loc=5,scale=10,size=100))\r\n",
        "\r\n",
        "X.append(200)\r\n",
        "\r\n",
        "Y = np.array(X)"
      ],
      "execution_count": 14,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 335
        },
        "id": "fPi5JMLx3aSQ",
        "outputId": "ed2ac8c4-78d3-49ba-bc4f-fdd4cef17c99"
      },
      "source": [
        "sns.distplot(Y)"
      ],
      "execution_count": 16,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.6/dist-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).\n",
            "  warnings.warn(msg, FutureWarning)\n"
          ],
          "name": "stderr"
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "<matplotlib.axes._subplots.AxesSubplot at 0x7f0bb9f85898>"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 16
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAD4CAYAAAD2FnFTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deXSc9X3v8fd3Rru1WpK1eEEGL2DCbiALoWmTtkAWN2nSAk1DWnrJ7W1Ol5zec0kXLs3JObfk3Jvc9Ja0pCW9hJaGlDaJm5CSBHoTCMTYEMDYsmx5wZskS5Ytjfbte/+YGVfIj6yRrUfPzOjzOmeOZp5l5vucsfTx8/x+z+9n7o6IiMhMsagLEBGR7KSAEBGRQAoIEREJpIAQEZFACggREQlUEHUBC6Wurs5bWlqiLkNEJKe89NJLPe5eH7QubwKipaWFHTt2RF2GiEhOMbM3ZlunS0wiIhJIASEiIoEUECIiEkgBISIigRQQIiISSAEhIiKBFBAiIhJIASEiIoEUECIiEihv7qSW2T227XDg8jtvXLPIlYhILtEZhIiIBFJAiIhIIAWEiIgEUkCIiEggBYSIiARSQIiISCAFhIiIBFJAiIhIIAWEiIgEUkCIiEggBYSIiARSQIiISCAFhIiIBFJAiIhIIAWEiIgEUkCIiEggBYSIiARSQIiISCBNOZpnZpteVERkvnQGISIigRQQIiISSAEhIiKBQg0IM7vFzNrMrN3M7g1YX2xmj6fWbzOzlhnr15jZgJn9YZh1iojI2UILCDOLAw8CtwKbgDvMbNOMze4GTrn7OuALwAMz1n8e+G5YNYqIyOzCPIO4AWh39wPuPgZ8Ddgy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P+QfJu7T8MWL4JeBUoBtYC+4F41PWex/HFU7VfDBSljmlT1HUt0LEdAupmLPsccG/q+b3AA1HXOY/juRm4Fnh9ruMBbgO+CxjwVmBb1PWf5/Hlze8f0ARcm3peAexNHUfefIfTH0viDOIczgzp4e4HgfSQHrnmzLAm7j4GpIc1yVdbgEdSzx8BfinCWubF3X9EssfedLMdzxbgq570E6DazJoWp9LzM8vxzSbnfv/cvcPdX049TwCtJEd5yJvvcLqlFBCfTJ3ifWXaJYmg4UDOGtIjB+TLcQRx4Htm9lJqaBWABnfvSD3vBHJ9wu/Zjiefvte8+/0zsxbgGmAbefod5k1AmNkPzOz1gMcW4K+AS4CrgQ7gf0VarMzHTe5+LXAr8DtmdvP0lZ48j8+bvtr5djwpeff7Z2blwD8Dv+/u/dPX5dN3mNNjMU3n7u/JZDsz+xvg26mX+TKkR74cx1nc/Vjq5wkz+wbJS6BHqL8AAAEpSURBVBBdZtbk7h2p0/UTkRZ54WY7nrz4Xt29K/08H37/zKyQZDj8g7v/S2pxXn6HeXMGcS4zrvl9EEj3sMiXIT0yGdYk55jZMjOrSD8HfoHkdzd9iJa7gG9FU+GCme14tgIfS/WEeSvQN+0yRs7Ip98/MzOSI0C0uvvnp63Kz+8w6lbyxXgAjwI7gddIfmFN09b9McneE23ArVHXegHHeBvJHhX7gT+Oup4FOqaLSfZyeRXYlT4ukkPCPw3sA34ALI+61nkc0z+SvMwyTvJ69N2zHQ/Jni8Ppr7TncDmqOs/z+PLm98/4CaSl49eA15JPW7Lp+9w+kNDbYiISKAlcYlJRETmTwEhIiKBFBAiIhJIASEiIoEUECIiEkgBISIigRQQIiIS6P8DcNJZUuS1cAQAAAAASUVORK5CYII=\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": [],
            "needs_background": "light"
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 447
        },
        "id": "9kvCC7zY4tc7",
        "outputId": "39d7bc32-d26e-4ff6-c49a-abefdd23215b"
      },
      "source": [
        "plt.style.use('default')\r\n",
        "plt.scatter(X, y = np.zeros(len(X)))\r\n",
        "plt.scatter(200,0,color='red')"
      ],
      "execution_count": 19,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "<matplotlib.collections.PathCollection at 0x7f0bb9a6a160>"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 19
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAGdCAYAAADuR1K7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAPYQAAD2EBqD+naQAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3ce3BU9eH38c/mDsLuGnJZIgkXHxQQhBpMWG2rj8kQkFqpOCKDgpRHRgpUDTIS5aK9TERGRQRh9PdrkUdRjK1WkdKJQUDLyiVg5ZrRPtwkbAKk2Q2XXMie5w/K+ltJQmKzCfnyfs3sIGe/Z/d79luy756cXZtlWZYAAAAMEdHeEwAAAGhNxA0AADAKcQMAAIxC3AAAAKMQNwAAwCjEDQAAMApxAwAAjELcAAAAo0S19wTaQyAQUGlpqbp27Sqbzdbe0wEAAM1gWZaqqqqUkpKiiIjGz89ckXFTWlqq1NTU9p4GAAD4AY4cOaIePXo0ev8VGTddu3aVdP7Fsdvt7TwbAADQHH6/X6mpqcH38cZckXFz4VdRdruduAEAoIO51CUlXFAMAACMQtwAAACjEDcAAMAoxA0AADAKcQMAAIxC3AAAAKMQNwAAwCjEDQAAMApxAwAAjELcAAAAoxA3AADAKMQNAAAwCnEDAACMQtwAAACjEDcAAMAoxA0AADAKcQMAAIxC3AAAAKMQNwAAwCjEDQAAMApxAwAAjELcAAAAoxA3AADAKMQNAAAwCnEDAACMQtwAAACjEDcAAMAoxA0AADAKcQMAAIxC3AAAAKMQNwAAwCjEDQAAMApxAwAAjELcAAAAoxA3AADAKMQNAAAwCnEDAACMQtwAAACjEDcAAMAoxA0AADAKcQMAAIxC3AAAAKMQNwAAwChtEjdLly5Vr169FBcXp8zMTG3durXJ8QUFBerXr5/i4uI0aNAgrV27ttGxjzzyiGw2mxYtWtTa0wYAAB1Q2ONm9erVys3N1fz587Vjxw4NHjxYOTk5Ki8vb3D85s2bNW7cOE2ePFk7d+7U6NGjNXr0aO3evfuise+//76++OILpaSkhPswAABABxH2uHnxxRf18MMPa9KkSRowYICWL1+uzp076w9/+EOD419++WWNGDFCs2bNUv/+/fXb3/5WN910k5YsWRIy7ujRo5oxY4beeustRUdHh/swAABABxHWuKmtrVVxcbGys7O/e8KICGVnZ8vj8TS4j8fjCRkvSTk5OSHjA4GAHnzwQc2aNUs33HDDJedRU1Mjv98fcgMAAGYKa9ycOHFC9fX1Sk5ODtmenJwsr9fb4D5er/eS4xcsWKCoqCj9+te/btY88vPz5XA4grfU1NQWHgkAAOgoOtynpYqLi/Xyyy9rxYoVstlszdonLy9PPp8veDty5EiYZwkAANpLWOMmISFBkZGRKisrC9leVlYml8vV4D4ul6vJ8Z999pnKy8uVlpamqKgoRUVF6dChQ5o5c6Z69erV4GPGxsbKbreH3AAAgJnCGjcxMTFKT09XUVFRcFsgEFBRUZHcbneD+7jd7pDxklRYWBgc/+CDD+qrr77Sl19+GbylpKRo1qxZ+tvf/ha+gwEAAB1CVLifIDc3VxMnTtTQoUOVkZGhRYsW6fTp05o0aZIkacKECbrmmmuUn58vSXr00Ud122236YUXXtCoUaP0zjvvaPv27XrttdckSd26dVO3bt1CniM6Oloul0vXX399uA8HAABc5sIeN2PHjtXx48c1b948eb1eDRkyROvWrQteNHz48GFFRHx3AumWW27RqlWrNGfOHD311FPq27evPvjgAw0cODDcUwUAAAawWZZltfck2prf75fD4ZDP5+P6GwAAOojmvn93uE9LAQAANIW4AQAARiFuAACAUYgbAABgFOIGAAA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sxMTHWNddcY40dO9b65ptvgvefPXvW+tWvfmVdffXVVufOna1f/OIX1rFjx9pxxub69NNPLUkX3SZOnGhZ1vmPg8+dO9dKTk62YmNjraysLKukpCTkMU6ePGmNGzfO6tKli2W3261JkyZZVVVV7XA0Zmlqbc6cOWMNHz7cSkxMtKKjo62ePXtaDz/88EX/R421aX0NrYkk649//GNwTHN+hh08eNAaOXKk1alTJyshIcGaOXOmVVdX1+rztf170gAAAEbgmhsAAGAU4gYAABiFuAEAAEYhbgAAgFGIGwAAYBTiBgAAGIW4AQAARiFuAACAUYgbAABgFOIGAAAYhbgBAABGIW4AAIBR/j/O56ku/cGFpgAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "3PFu-HFg5jTo"
      },
      "source": [
        "#Outlier Detection using a Quantitative Approach\r\n",
        "\r\n",
        ">## 1. Z-Score Method"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Wb7vPN6G5TA5"
      },
      "source": [
        "mu = np.mean(X)\r\n",
        "sigma = np.std(X)\r\n",
        "z = (X-mu)/sigma"
      ],
      "execution_count": 26,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "uP6p7KfE5ydy"
      },
      "source": [
        "threshhold = 3\r\n",
        "outliers_z = z[z>threshhold]"
      ],
      "execution_count": 27,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ahznIjjU56R5"
      },
      "source": [
        "outliers_X  = outliers_z*sigma + mu"
      ],
      "execution_count": 29,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "r0w7nL4I6HGF",
        "outputId": "947d061c-75f3-439f-89f8-416b24af79a3"
      },
      "source": [
        "outliers_X"
      ],
      "execution_count": 30,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "array([200.])"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 30
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "0pKhUjsk6Q7J"
      },
      "source": [
        "#Hence you can see that what was visually evident, we can now find quantitatively. "
      ],
      "execution_count": 31,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "JiFNBdDq68rh"
      },
      "source": [
        "# 2. Using IQR-Method"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 428
        },
        "id": "YA5L_tNs6ttb",
        "outputId": "dfba6281-0f77-4461-933c-e4223c227471"
      },
      "source": [
        "sns.boxplot(y=X)"
      ],
      "execution_count": 34,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "<matplotlib.axes._subplots.AxesSubplot at 0x7f0bb1d10eb8>"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 34
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGKCAYAAAAmMbr9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAPYQAAD2EBqD+naQAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAYu0lEQVR4nO3df2xd9X3/8de1Q+xQYkcBYmOIK+i2AlsLEpA0lFbqiJqEFok0kxKSTgExkBhBKWnXKX+MrmrVbLTKGhBt/umabcLQ9Q86wZZIKJSgKgGl0Zg2BKhUaE4UbMBRfJNoNsG53z/45qrmVzEknI/tx0M6kn3OudfvK8u5z5xz7r21RqPRCABAQVqqHgAA4K0ECgBQHIECABRHoAAAxREoAEBxBAoAUByBAgAUR6AAAMWZUfUAH8SJEydy8ODBzJ49O7VarepxAID3odFo5MiRI+np6UlLy3sfI5mUgXLw4MHMnz+/6jEAgA9g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9iiuuyBlnnJGdO3c2173wwgvp7+/PokWLkiSLFi3Kf//3f+eVV15p7vPYY4+lo6Mjl1566Yd5LMAkdsEFF2T16tXNGKnValm9enXOP//8iicDqjChV/H85V/+Zfr6+vJv//Zv+eQnP9lc39nZmVmzZiVJbr/99vzHf/xHtm3blo6Ojtx5551J0nzTpbGxsVx++eXp6enJPffck4GBgfz5n/95/uIv/iLf+9733tccXsUDU9PIyEi++tWv5rXXXsu5556bf/mXf0l7e3vVYwGnyESevycUKO92mPWnP/1pbrrppiRv/gPz9a9/PQ8++GBGR0ezZMmS/OhHPxp3+uZ///d/c/vtt+eJJ57Ixz72saxduzZ/93d/lxkzZryvOQQKTF27d+/Oli1bsn79+lx99dVVjwOcQqctUEohUABg8vnI3gcFAOB0ECgAQHEECgBQHIECABRHoAAAxREoAEBxBAoAUByBAgAUR6AAAMURKABAcQQKAFAcgQIAFEegAADFESgAQHEECgBQHIECABRHoAAAxREoAEBxBAoAUByBAgAUR6AAAMURKABAcQQKAFAcgQIAFEegAADFESgAQHEECgBQHIECABRHoAAAxREoAEBxBAoAUByBAgAUR6AAAMURKABAcQQKAFAcgQIAFEegAADFESgAQHEECgBQHIECABRHoAAAxREoAEBxBAoAUByBAgAUR6AAAMURKABAcQQKAFAcgQIAFEegAADFESgAQHEECgBQHIECABRHoAAAxREoAEBxBAoAUByBAgAUR6AAAMURKABAcQQKAFAcgQIAFEegAADFESgAQHEECgBQHIECABRHoAAAxREoAEBxJhwoTz75ZK6//vr09PSkVqvlF7/4xbjtN910U2q12rhl6dKl4/Y5dOhQ1qxZk46OjsyZMye33HJLjh49+uEeCQAwZUw4UI4dO5bLLrss999//7vus3Tp0rz88svN5cEHHxy3fc2aNXn22Wfz2GOP5dFHH82TTz6Z2267beLTAwBT0oyJ3mDZsmVZtmzZe+7T1taW7u7ud9z23HPPZceOHdm7d2+uvPLKJMl9992X6667Lj/4wQ/S09Mz0ZEAgCnmtFyD8sQTT2TevHn55Cc/mdtvvz1DQ0PNbXv27MmcOXOacZIkixcvTktLS55++ul3vL/R0dHU6/VxCwAwdZ3yQFm6dGn++Z//OTt37szf//3fZ9euXVm2bFnGxsaSJAMDA5k3b96428yYMSNz587NwMDAO97npk2b0tnZ2Vzmz59/qscGAAoy4VM8v8+qVauaX3/qU5/Kpz/96XziE5/IE088kWuvvfYD3efGjRuzYcOG5vf1el2kAMAUdtpfZnzRRRflnHPOyYsvvpgk6e7uziuvvDJunzfeeCOHDh161+tW2tra0tHRMW4BAKau0x4oBw4cyNDQUM4777wkyaJFi3L48OHs27evuc/jjz+eEydOZOHChad7HABgEpjwKZ6jR482j4YkyUsvvZRnnnkmc+fOzdy5c/Ptb387K1asSHd3d37729/mm9/8Zv7gD/4gS5YsSZJccsklWbp0aW699dZs3bo1x48fz7p167Jq1Sqv4AEAkiS1RqPRmMgNnnjiiXzhC1942/q1a9fmxz/+cW644Yb853/+Zw4fPpyenp588YtfzHe+8510dXU19z106FDWrVuXRx55JC0tLVmxYkXuvffenHXWWe9rhnq9ns7OzgwPDzvdAwCTxESevyccKCUQKAAw+Uzk+dtn8QAAxREoAEBxBAoAUByBAgAUR6AAAMURKABAcQQKAFAcgQIAFEegAADFESgAQHEECgBQHIECABRHoAAAxREoAEBxBAoAUByBAgAUR6AAAMURKABAcQQKAFAcgQIAFEegAADFESgAQHEECgBQHIECABRHoAAAxREoAEBxBAoAUByBAgAUR6AAAMURKABAcQQKAFAcgQIAFEegAADFESgAQHEECgBQHIECABRHoAAAxREoAEBxBAoAUByBAgAUR6AAAMURKABAcQQKAFAcgQIAFEegAADFESgAQHEECgBQHIECABRHoAAAxREoAEBxBAoAUByBAgAUR6AAAMURKABAcQQKAFAcgQIAFEegAADFESgAQHEECgBQHIECABRHoAAAxREoAEBxBAoAUByBAgAUR6AAAMURKABAcSYcKE8++WSuv/769PT0pFar5Re/+MW47Y1GI3fffXfOO++8zJo1K4sXL85vfvObcfscOnQoa9asSUdHR+bMmZNbbrklR48e/XCPBACYMiYcKMeOHctll12W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KI1AAgOJMyneSbTQaSZJ6vV7xJADA+3Xyefvk8/h7mZSBcuTIkSTJ/PnzK54EAJioI0eOpLOz8z33qTXeT8YU5sSJEzl48GBmz57d/Gh2YGqo1+uZP39+9u/fn46OjqrHAU6hRqORI0eOpKenJy0t732VyaQMFGDqqtfr6ezszPDwsECBacxFsgBAcQQKAFAcgQIUpa2tLd/61rfS1tZW9ShAhVyDAgAUxxEUAKA4AgUAKI5AAQCKI1AAgOIIFACgOAIFACiOQAEAiiNQAIDi/D/9j1E7K6HetgAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "ncCsLgte6w7F",
        "outputId": "ec0cfb08-d16b-42a8-fc23-8ae016d001cb"
      },
      "source": [
        "Q1 = np.percentile(X,25)\r\n",
        "Q3 = np.percentile(X,75)\r\n",
        "IQR = Q3 - Q1\r\n",
        "IQR"
      ],
      "execution_count": 37,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "11.196649361474535"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 37
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "t0uGD5cA7PNH"
      },
      "source": [
        "min_ = Q1 - 1.5*IQR\r\n",
        "max_ = Q3 + 1.5*IQR\r\n",
        "\r\n",
        "outs = []\r\n",
        "for v in X:\r\n",
        "  if v>max_ or v<min_:\r\n",
        "    outs.append(v)\r\n"
      ],
      "execution_count": 41,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "nyMrkAal8Bcu",
        "outputId": "34e58692-46aa-4ee7-edc8-0dccab37e785"
      },
      "source": [
        "outs"
      ],
      "execution_count": 42,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "[30.188555885141113, -18.996040314917522, 32.684133468025124, 200]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 42
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "HFgRZ1Mf8Vlo"
      },
      "source": [
        ""
      ],
      "execution_count": null,
      "outputs": []
    }
  ]
}